home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 7_10.lha / 7_10 / 7_10pr3.h < prev    next >
Text File  |  1993-08-08  |  1KB  |  43 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / class process private member functions
  6. / private:
  7.    // Check if this function is above the low-water mark.
  8.    int mustrecurse()
  9.    { return Stackdir.less(Stackdir.plusone(), t_stackbase); }
  10.  
  11.    // Used by pause(), wait(), sleep().
  12.    // Save the current state of this process.
  13.    // Returns true when coming back from another process.
  14.    int contextswitch();
  15.  
  16.    // Used by pause(), wait(), sleep().
  17.    // Find the next class to run
  18.    // and call restore() on it.
  19.    void schedule();
  20.  
  21.    // Used by schedule().
  22.    // Restore a process to be the current process.
  23.    // It doesn't return but instead comes back
  24.    // through contextswitch().
  25.    // It copies a process' copy of the stack into
  26.    // the stack and longjmp's there.
  27.    void restore();
  28.  
  29.    // Used by schedule() and wakeup().
  30.    // Move the top process to its place time and
  31.    // priority-wise in the list of runnable processes.
  32.    void shufflerunlist();
  33.  
  34.    // Remove a process from a given list.
  35.    // Return 0 if not found on the list.
  36.    int rmfromlist(process *, process**);
  37.  
  38.    // the real version of the destructor
  39.    void Rprocessdest();
  40.  
  41.    // Reschedule the process for d time units from now.
  42.    void wakeup(unsigned long = 0);
  43.